library(readxl)
library(lubridate)
library(dplyr)
library(ggplot2)
protest_data_incomplete <- read_excel("pori_data.xlsx")
m1 <- protest_data_incomplete %>%
  group_by(respondent) %>%
  slice(1)

endtime <- ymd_hms(m1$end_time,tz="America/Chicago")
m1$time <- with_tz(endtime,tz = "Asia/Hong_Kong")
m1 %>% 
  filter(time < ymd_hms("2021-07-23 00:14:00")) %>% 
  ggplot(aes(time)) + 
  geom_freqpoly(binwidth = 300, size=1.5) + # 300 s = 5 minutes
  theme_classic() +
  theme(axis.text = element_text(size=25),
        axis.title = element_text(size=25)) +
  labs(x="Time",y="Count")
ggsave("Figure8.png", width = 10, height = 6, units = "in", dpi = 350)
